<template>
	<view class="Lu-news-body">
		<view class="Lu-news-Lists">
			<view class="Lu-news-List" v-for="(item,index) in newsList" :key="index">
				<view class="Lu-news-time">
					{{item.create_time}}
				</view>
				<view class="Lu-news-title">
					{{item.name}}
				</view>
				<view class="Lu-news-content">
					{{item.describe}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		mapState
	} from 'vuex';
	
	export default{
		computed: {
			...mapState(['hasLogin','openId','apiUrl'])
		},
		data(){
			return{
				newsList:[]
			}
		},
		onShow:function(){
			this.getnewsList()
		},
		methods:{
			getnewsList:function(){
				uni.request({
					url:this.apiUrl+'api/get_notice',
					data:{},
					method:'POST',
					header:{
						openid:this.openId
					},
					success: (res) => {
						console.log(res)
						this.newsList = res.data.data
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	page{
		background-color: #f5f5f5;
	}
	.Lu-news-body{
		padding: 20rpx;
		.Lu-news-Lists{
			.Lu-news-List{
				background-color: #ffffff;
				padding: 20rpx 30rpx;
				border-radius: 20rpx;
				margin-bottom: 20rpx;
				.Lu-news-time{
					font-size: 24rpx;
					color: #666666;
				}
				.Lu-news-title{
					font-size: 30rpx;
					font-weight: 500;
					margin-top: 20rpx;
				}
				.Lu-news-content{
					font-size: 24rpx;
					color: #666666;
					margin-top: 20rpx;
				}
			}
		}
	}
</style>
